package com.lglbc;

import io.grpc.Server;
import io.grpc.ServerBuilder;

public class HelloServer {
    public static void main(String[] args) throws Exception {
        Server server = ServerBuilder.forPort(9090)
                .addService(new HelloServiceIpl())
                .intercept(new ServerLoggingInterceptor())
                .build();
        server.start();
        System.out.println("gRPC服务启动");
        server.awaitTermination();
    }
}